package com.cn.serverline.lineicp.productionLine.param;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 产品类型和产品型号修改参数
 *
 * @author Gmr
 * @since 2024/7/30
 */
@Data
public class ProductsEditParam {

	/**
	 * 主键id
	 */
	@ApiModelProperty(value = "主键ID", required = true)
	@JsonSerialize(using= ToStringSerializer.class)
	@NotNull(message = "id不能为空")
	private Long id;

	/**
	 * 产品类型或者型号名称
	 */
	@ApiModelProperty(value = "产品类型或者型号名称", required = true)
	@NotBlank(message = "名称不能为空")
	@Size(max = 30, message = "名称长度不能超过30")
	private String name;
}
